package com.yanqu.road.server.cmd.strongholdwar;

import com.yanqu.road.logic.pb.CrossRankPb;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.StrongholdWarProto;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.strongholdwar.CrossStrongholdMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_CROSS_STRONGHOLD_UPDATE_UNION_BASE, desc = "更新联盟信息")
public class CrossUpdateUnionBaseCmd extends CrossUnionCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        StrongholdWarProto.CrossUpdateUnionBaseMsgReq req = StrongholdWarProto.CrossUpdateUnionBaseMsgReq.parseFrom(packet.getBytes());
        CrossStrongholdMgr.updateUnionBase(req.getActivityId(), req.getUnionUid(), CrossRankPb.parseUnionBaseInfo(req.getUnionInfo()));
    }

    @Override
    public void sendData() {

    }
}
